Skip to content

Instantly share code, notes, and snippets.

@gornostal
gornostal / README.md
Last active May 18, 2024 08:03
Ulauncher Color Themes

This will be a temporary site for sharing Ulauncher color themes

When posting a theme make sure it has

  • title (theme name or whatever)
  • link to a gist or github repo with theme files
  • screenshot attached (just drag an image onto a comment area)

@belgattitude
belgattitude / ci-yarn-install.md
Last active May 18, 2024 07:57
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@iamarcel
iamarcel / search-gpt.py
Created February 11, 2023 12:57
Basic GPT-3 + Bing Answering Machine
import os
import openai
import requests
from pprint import pprint
import dotenv
dotenv.load_dotenv()
openai_api_key = os.environ.get("OPENAI_API_KEY")
bing_search_api_key = os.environ['BING_SEARCH_V7_SUBSCRIPTION_KEY']
@pojntfx
pojntfx / main.sh
Last active May 18, 2024 07:53
Bluesky/AT Protocol: cURL API Interaction Cheatsheet
#!/bin/bash
# This script resolves a DID, retrieves an API key, fetches a user's feed,
# and posts a "Hello, world" message to the user's feed.
# Resolve DID for handle
HANDLE='felicitas.pojtinger.com'
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
export DID=$(curl -G \
--data-urlencode "handle=$HANDLE" \
@RaczeQ
RaczeQ / pyarrow_multiprocessing_streaming.py
Last active May 18, 2024 07:50
Pyarrow Multiprocessing with streaming the result
import multiprocessing
from pathlib import Path
from queue import Queue
import pyarrow as pa
import pyarrow.parquet as pq
def _worker(queue: Queue[tuple[str, int]], save_path: Path, *args, **kwargs) -> None:
current_pid = multiprocessing.current_process().pid
@wilinz
wilinz / ms-edge-tts-api.md
Last active May 18, 2024 07:49
微软edge-tts-api(大声朗读协议)
@dogles
dogles / markovjr_tech_notes.md
Last active May 18, 2024 07:48
Markov Jr. Technical Notes

Introduction

Markov Jr. is an open source C# application that creates procedural content primarily via applying Markov rewrite rules to a 2D or 3D grid. A rewrite rule has an input and output pattern, which essentially specifies what pattern to look for in the existing grid, and what to replace it with.

For example, given a 2D grid, this would replace any white dot with a white cross:

***/*W*/*** :: *W*/WWW/*W*

The left hand side is the rule input, and the right hand side is the output. The / character is used to delimit rows, and space is used to delimit Z-layers (in 3D grids). The input rule above translates to the 2D pattern:

@rebane2001
rebane2001 / plot_discord_predictions.py
Created May 18, 2024 00:18
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
"""
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it.
You may need to install matplotlib first:
pip install -U matplotlib
thrown together by rebane2001
"""
@darinwilson
darinwilson / sonic_pi_examples.txt
Last active May 18, 2024 07:48
Sonic Pi Examples
##############################################
## Example 1 - play a note
play 60
##############################################
## Example 2 - play 4 random notes
4.times do
play rrand_i(60, 90)
sleep 0.5